<?php
	// The name of document root path
	define('DOCUMENT_ROOT', $_SERVER["DOCUMENT_ROOT"]);
	// The name of document root path
	define('DOMAIN', 'http://'.$_SERVER['HTTP_HOST']);
	// The name of configs files path
	define('CONFIGS', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'configs');    
	// The name of upload files path
	define('UPLOADS', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'uploads');
	// The name of caches files path
	define('CACHES', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'caches');
	// The name of class files path
	define('CLASS', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'class');
	// The name of functions files path
	define('FUNCTIONS', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'functions');
	// The name of library files path
	define('LIBRARY', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'library');
	// The name of access files path
	define('ACCESS', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'access');
	// The name of backup files path
	define('BACKUP', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'backup');
	// The name folder modules
	define('MODULE', DOCUMENT_ROOT.DIRECTORY_SEPARATOR.'modules');    
    
    // get configs
    
    $xml=simplexml_load_file(CONFIGS.'/configs.xml') or die("Error: Cannot create object");
    // define localhost
    define('LOCALHOST',$xml->localhost);                      
    // define localhost
    define('DBNAME',$xml->dbname);
    // define localhost
    define('DBUSER',$xml->dbuser);
    // define localhost
    define('DBPASS',$xml->dbpass);
    
   	// define key for application
	define('HPAPP', true);
           
    require_once CONFIGS.'/app.php';
?>